package cn.edu.hnu.gpg.service;

import cn.edu.hnu.gpg.dao.PlanMapper;
import cn.edu.hnu.gpg.entity.Plan;
import cn.edu.hnu.gpg.entity.PlanExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlanServiceImpl implements PlanService {

    private final PlanMapper planMapper;

    @Autowired
    public PlanServiceImpl(PlanMapper planMapper) {
        this.planMapper = planMapper;
    }

    @Override
    public List<Plan> listPlans() {
        return planMapper.selectByExample(new PlanExample());
    }
}
